package com.crrc.yzt.demo.fragment

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.crrc.yzt.demo.activity.CarHomeActivity
import com.crrc.yzt.demo.activity.CarListActivity
import com.crrc.yzt.demo.activity.MainActivity
import com.crrc.yzt.demo.blue.databinding.FragmentCodeLoginBinding

class CodeLoginFragment : Fragment() {

    private var viewBinding: FragmentCodeLoginBinding? = null



    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        viewBinding = FragmentCodeLoginBinding.inflate(inflater, container, false)
        return viewBinding?.root
    }



    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        viewBinding?.apply {
            btnLogin.setOnClickListener {
                startActivity(Intent(activity, CarHomeActivity::class.java))
                activity?.finish()
            }
        }
    }

    override fun onDestroyView() {
        super.onDestroyView()
        viewBinding = null
    }


}